package bandi.osgi.dal.dao.beans;

import java.io.Serializable;

public class DeviceType implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1857818184145544408L;

	private long device_type_id;
	private String type;
	private String manufacturer;
	private String model;
	private String os;
	private String firmware;
	private String os_version;
	private String firmware_version;

	public DeviceType(long device_type_id, String firmware,
			String firmware_version, String manufacturer, String model,
			String os, String os_version, String type) {
		super();
		this.device_type_id = device_type_id;
		this.firmware = firmware;
		this.firmware_version = firmware_version;
		this.manufacturer = manufacturer;
		this.model = model;
		this.os = os;
		this.os_version = os_version;
		this.type = type;
	}

	public DeviceType() {
		super();
	}

	public long getDevice_type_id() {
		return device_type_id;
	}

	public void setDevice_type_id(long device_type_id) {
		this.device_type_id = device_type_id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getManufacturer() {
		return manufacturer;
	}

	public void setManufacturer(String manufacturer) {
		this.manufacturer = manufacturer;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getOs() {
		return os;
	}

	public void setOs(String os) {
		this.os = os;
	}

	public String getFirmware() {
		return firmware;
	}

	public void setFirmware(String firmware) {
		this.firmware = firmware;
	}

	public String getOs_version() {
		return os_version;
	}

	public void setOs_version(String os_version) {
		this.os_version = os_version;
	}

	public String getFirmware_version() {
		return firmware_version;
	}

	public void setFirmware_version(String firmware_version) {
		this.firmware_version = firmware_version;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ (int) (device_type_id ^ (device_type_id >>> 32));
		result = prime * result
				+ ((firmware == null) ? 0 : firmware.hashCode());
		result = prime
				* result
				+ ((firmware_version == null) ? 0 : firmware_version.hashCode());
		result = prime * result
				+ ((manufacturer == null) ? 0 : manufacturer.hashCode());
		result = prime * result + ((model == null) ? 0 : model.hashCode());
		result = prime * result + ((os == null) ? 0 : os.hashCode());
		result = prime * result
				+ ((os_version == null) ? 0 : os_version.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DeviceType other = (DeviceType) obj;
		if (device_type_id != other.device_type_id)
			return false;
		if (firmware == null) {
			if (other.firmware != null)
				return false;
		} else if (!firmware.equals(other.firmware))
			return false;
		if (firmware_version == null) {
			if (other.firmware_version != null)
				return false;
		} else if (!firmware_version.equals(other.firmware_version))
			return false;
		if (manufacturer == null) {
			if (other.manufacturer != null)
				return false;
		} else if (!manufacturer.equals(other.manufacturer))
			return false;
		if (model == null) {
			if (other.model != null)
				return false;
		} else if (!model.equals(other.model))
			return false;
		if (os == null) {
			if (other.os != null)
				return false;
		} else if (!os.equals(other.os))
			return false;
		if (os_version == null) {
			if (other.os_version != null)
				return false;
		} else if (!os_version.equals(other.os_version))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

}
